﻿// =====================================================================
//
//  This file is part of the Microsoft Dynamics CRM SDK code samples.
//
//  Copyright (C) Microsoft Corporation.  All rights reserved.
//
//  This source code is intended only as a supplement to Microsoft
//  Development Tools and/or on-line documentation.  See these other
//  materials for detailed information regarding Microsoft code samples.
//
//  THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
//  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
//  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
//  PARTICULAR PURPOSE.
//
// =====================================================================
using System.Runtime.Serialization;

namespace Microsoft.Xrm.Sdk.Metadata
{
	/// <summary>
	/// StateOption represents the name/value combination that can
	/// be used for state values. In addition to the base Option
	/// info, StateOption has an extra field indicating what the default
	/// status for this state is.
	/// </summary>
	[DataContract(Name = "StateOptionMetadata", Namespace = XmlNamespaces.V5.Metadata)]
	public sealed class StateOptionMetadata : OptionMetadata
	{
		private int? _defaultStatus;
		private string _invariantName;

		public StateOptionMetadata()
			: base()
		{
		}

		[DataMember]
		public int? DefaultStatus
		{
			get { return this._defaultStatus; }
			set { this._defaultStatus = value; }
		}

		[DataMember]
		public string InvariantName
		{
			get { return this._invariantName; }
			set { this._invariantName = value; }
		}
	}
}
